package xyz.labmem.controller

import javafx.application.Platform

/**
 * @Author lty
 * @Date 2021/10/11 8:54
 */
class ViewTool(controller: BrowserReptileController) {

    private val base = controller

    fun updateStatus(progress: Double, msg: String) {
        Platform.runLater {
            base.taskProgress?.let {
                it.progress = progress
            }
            base.statusBar?.let {
                it.text = msg
            }
        }
    }

    fun doneStatus() {
        updateStatus(0.0, "准备就绪")
    }


}